package com.pafcio.dde.server;

public class SimpleTimeGenerationStrategy implements TimeGenerationStrategy {

	private boolean canContinue = true;
	private int timeout;
	
	public SimpleTimeGenerationStrategy(int timeout) {
		this.timeout = timeout;
	}
	
	@Override
	public boolean getCanContinue() {
		return canContinue;
	}
	
	@Override
	public void doAfterPostingActions() {
		try {
			Thread.sleep(generateTimeout());
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	
	private long generateTimeout() {
		return timeout;
	}
}
